using System.Data;
using ET;
namespace DA
{
	public class Bank_Account_DAL
	{
	private clsConnect cls = new clsConnect();

	#region Getdata
	public DataTable BindGirdtb_Bank_Account(string keywords)
	{
	return cls.Search("sp_tb_Bank_Account_Search", "@KeyWords", keywords);
	}
    //public DataTable BindGirdtb_Bank_AccountDetail(int id)
    //{
    //}
	#endregion

	#region Insert
	public bool Inserttb_Bank_Account(Bank_Account_ET data)
	{
	cls.CreateNewSqlCommand();
	cls.AddParameter("@Bank_Account_Name", data.Bank_Account_Name);
	cls.AddParameter("@Bank_Name", data.Bank_Name);
	cls.AddParameter("@Bank_Account_User_Add", data.Bank_Account_User_Add);
	cls.AddParameter("@Bank_Account_Date_Add", data.Bank_Account_Date_Add);
	cls.AddParameter("@Bank_Account_Computer_Add", data.Bank_Account_Computer_Add);
	cls.AddParameter("@Bank_Account_User_Modify", data.Bank_Account_User_Modify);
	cls.AddParameter("@Bank_Account_Date_Modify", data.Bank_Account_Date_Modify);
	cls.AddParameter("@Bank_Account_Computer_Modify", data.Bank_Account_Computer_Modify);
	cls.ExecuteNonQuery("sp_tb_Bank_Account_Insert");
	return true;
	}
	#endregion

	#region Update
	public bool Updatetb_Bank_Account(Bank_Account_ET data)
	{
	cls.CreateNewSqlCommand();
	cls.AddParameter("@Bank_Account_ID", data.Bank_Account_ID);
	cls.AddParameter("@Bank_Account_Name", data.Bank_Account_Name);
	cls.AddParameter("@Bank_Name", data.Bank_Name);
	cls.AddParameter("@Bank_Account_User_Modify", data.Bank_Account_User_Modify);
	cls.AddParameter("@Bank_Account_Date_Modify", data.Bank_Account_Date_Modify);
	cls.AddParameter("@Bank_Account_Computer_Modify", data.Bank_Account_Computer_Modify);
	cls.ExecuteNonQuery("sp_tb_Bank_Account_Update");
	return true;
	}
	#endregion

	#region Delete
	public bool Deletetb_Bank_Account(int id)
	{
        cls.Delete("sp_tb_Bank_Account_Delete", "@Bank_Account_ID", id);
	return true;
	}
	#endregion
	}
}